package com.ruoyi.repair.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 故障报修对象 t_fault_report
 * 
 * @author ruoyi
 * @date 2025-09-29
 */
public class TFaultReport extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 报修单号 */
    @Excel(name = "报修单号")
    private String reportNo;

    /** 资产编号 */
    @Excel(name = "资产编号")
    private String assetNo;

    /** 资产类型 */
    @Excel(name = "资产类型")
    private String assetType;

    /** 资产名称 */
    @Excel(name = "资产名称")
    private String assetName;

    /** 位置 */
    @Excel(name = "位置")
    private String location;

    /** 使用部门 */
    @Excel(name = "使用部门")
    private String deptId;

    /** 使用部门名称 */
    @Excel(name = "使用部门名称")
    private String deptName;

    /** 发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date occurTime;

    /** 报修人 */
    @Excel(name = "报修人")
    private String reporter;

    /** 班次 */
    @Excel(name = "班次")
    private String shiftName;

    /** 故障类型 */
    @Excel(name = "故障类型")
    private String faultType;

    /** 故障类型名称 */
    @Excel(name = "故障类型名称")
    private String faultTypeName;

    /** 故障描述 */
    @Excel(name = "故障描述")
    private String faultDescription;

    /** 紧急程度 */
    @Excel(name = "紧急程度")
    private String urgency;

    /** 紧急程度名称 */
    @Excel(name = "紧急程度名称")
    private String urgencyName;

    /** 报修类型 */
    @Excel(name = "报修类型")
    private String reportType;

    /** 报修类型名称 */
    @Excel(name = "报修类型名称")
    private String reportTypeName;

    /** 报修时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报修时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date reportTime;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 状态名称 */
    @Excel(name = "状态名称")
    private String statusName;

    /** 故障图片 */
    @Excel(name = "故障图片")
    private String imageUrls;

    /** 关联维修单号 */
    @Excel(name = "关联维修单号")
    private String workOrderNo;

    // 用于接收前端搜索参数中的"type"字段，并映射到assetType
    private String type;

    public void setReportNo(String reportNo) 
    {
        this.reportNo = reportNo;
    }

    public String getReportNo() 
    {
        return reportNo;
    }
    public void setAssetNo(String assetNo) 
    {
        this.assetNo = assetNo;
    }

    public String getAssetNo() 
    {
        return assetNo;
    }
    public void setAssetType(String assetType) 
    {
        this.assetType = assetType;
    }

    public String getAssetType() 
    {
        return assetType;
    }
    public void setAssetName(String assetName) 
    {
        this.assetName = assetName;
    }

    public String getAssetName() 
    {
        return assetName;
    }
    public void setLocation(String location) 
    {
        this.location = location;
    }

    public String getLocation() 
    {
        return location;
    }
    public void setDeptId(String deptId) 
    {
        this.deptId = deptId;
    }

    public String getDeptId() 
    {
        return deptId;
    }
    public void setDeptName(String deptName) 
    {
        this.deptName = deptName;
    }

    public String getDeptName() 
    {
        return deptName;
    }
    public void setOccurTime(Date occurTime) 
    {
        this.occurTime = occurTime;
    }

    public Date getOccurTime() 
    {
        return occurTime;
    }
    public void setReporter(String reporter) 
    {
        this.reporter = reporter;
    }

    public String getReporter() 
    {
        return reporter;
    }
    public void setShiftName(String shiftName) 
    {
        this.shiftName = shiftName;
    }

    public String getShiftName() 
    {
        return shiftName;
    }
    public void setFaultType(String faultType) 
    {
        this.faultType = faultType;
    }

    public String getFaultType() 
    {
        return faultType;
    }
    public void setFaultTypeName(String faultTypeName) 
    {
        this.faultTypeName = faultTypeName;
    }

    public String getFaultTypeName() 
    {
        return faultTypeName;
    }
    public void setFaultDescription(String faultDescription) 
    {
        this.faultDescription = faultDescription;
    }

    public String getFaultDescription() 
    {
        return faultDescription;
    }
    public void setUrgency(String urgency) 
    {
        this.urgency = urgency;
    }

    public String getUrgency() 
    {
        return urgency;
    }
    public void setUrgencyName(String urgencyName) 
    {
        this.urgencyName = urgencyName;
    }

    public String getUrgencyName() 
    {
        return urgencyName;
    }
    public void setReportType(String reportType) 
    {
        this.reportType = reportType;
    }

    public String getReportType() 
    {
        return reportType;
    }
    public void setReportTypeName(String reportTypeName) 
    {
        this.reportTypeName = reportTypeName;
    }

    public String getReportTypeName() 
    {
        return reportTypeName;
    }
    public void setReportTime(Date reportTime) 
    {
        this.reportTime = reportTime;
    }

    public Date getReportTime() 
    {
        return reportTime;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setStatusName(String statusName) 
    {
        this.statusName = statusName;
    }

    public String getStatusName() 
    {
        return statusName;
    }
    public void setImageUrls(String imageUrls) 
    {
        this.imageUrls = imageUrls;
    }

    public String getImageUrls() 
    {
        return imageUrls;
    }
    public void setWorkOrderNo(String workOrderNo) 
    {
        this.workOrderNo = workOrderNo;
    }

    public String getWorkOrderNo() 
    {
        return workOrderNo;
    }

    // type属性的getter和setter方法
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
        // 当type被设置时，同时设置assetType以确保查询正确
        if (type != null && !type.isEmpty()) {
            this.assetType = type;
        }
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("reportNo", getReportNo())
            .append("assetNo", getAssetNo())
            .append("assetType", getAssetType())
            .append("assetName", getAssetName())
            .append("location", getLocation())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .append("occurTime", getOccurTime())
            .append("reporter", getReporter())
            .append("shiftName", getShiftName())
            .append("faultType", getFaultType())
            .append("faultTypeName", getFaultTypeName())
            .append("faultDescription", getFaultDescription())
            .append("urgency", getUrgency())
            .append("urgencyName", getUrgencyName())
            .append("reportType", getReportType())
            .append("reportTypeName", getReportTypeName())
            .append("reportTime", getReportTime())
            .append("status", getStatus())
            .append("statusName", getStatusName())
            .append("imageUrls", getImageUrls())
            .append("workOrderNo", getWorkOrderNo())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}